#include <iostream>
using namespace std;
#include <string.h>

#include <QtGui/QApplication>
#include <QtGui/QPushButton>
#include <QtCore/QAbstractTableModel>
#include <QtGui/QTableView>
#include <QtCore/QTimer>

#include "model.h"

int main(int argc, char *argv[])
{
  QApplication app(argc, argv);
  //QPushButton hello("Hello world!");
  //hello.show();
	
  S data[4];
  load_data(data);

  QTableView tv;  
  STableModel tm(4, data);
  RefreshTimer t(&app, &tv, &tm);

  tv.setModel(&tm);
  tv.setUpdatesEnabled(true);
  tv.show();
  
  t.start(1000);

  //QwtVFRTablePlotCurve cmc; cmc.set(&tm, ...);
  //QwtPlot plot; cmc.attach(&plot);
  
  return app.exec();
}

